public class ccc {
    public abstract static class Staff{
        private String id;
        private String name;
        private double salary;

        public Staff(String id,String name,double salary){
            super();
            this.id = id;
            this.name = name;
            this.salary = salary;
        }
        public void work(){
            System.out.println("工号:"+id+"姓名:"+name+"工资:"+salary);
        }
        public static void main(String[] args){
            Teacher a = new Teacher("001","云",6000);
            a.setDay(365);
            a.work();
            Waiter b = new Waiter("002","天",5000);
            b.work();
            Scientist c = new Scientist("003","陈",6000);
            c.setBonus(50000);
            c.work();
        }
    }

    static class Teacher extends Staff{
        private int day;

        public Teacher(String id,String name,double salary){
            super(id,name,salary);

        }

        public int setDay(int day){
            this.day = day;
            return day;
        }
        public void work(){
            super.work();
            System.out.println(";课酬为:"+day*100);
        }
    }

    static class Waiter extends Staff{

        public Waiter(String id,String name,double salary){
            super(id,name,salary);
        }

        public void work(){
            super.work();
        }
    }

    static class Scientist extends Staff{

        public Scientist(String id,String name,double salary){
            super(id,name,salary);
        }
        private double bonus;

        public double setBonus(double bonus){
            this.bonus = bonus;
            return bonus;
        }

        public void work(){
            super.work();
            System.out.println(";奖金:"+ bonus);
        }
    }
}
